<?php
/**
 * Html form for account creation
 *
 * @file
 * @ingroup Templates
 */
/**
 * @defgroup Templates Templates
 */
if (!defined('MEDIAWIKI'))
    die(-1);

/**
 * @ingroup Templates
 */
class Profilcreate extends QuickTemplate {

    private $user;
    private $rows;

    function __construct($user, $rows) {
        parent::__construct();
        $this->user = $user;
        $this->rows = $rows;
        $data = array();
    }

    public function execute() {
        if (!$this->user->isLOggedIn()) {
            echo "vous êtes pas connecté";
            exit;
        } 
        ?>
        <form method="POST" action='http://www.solidaritychain.com.dev/index.php/Special:profil?action=valider' />
        <div align="left">
            PHOTO
        </div>
        <div align="center">
            <?php
                    
            foreach ($this->rows as $k => $value) {
                ?> 

                <table>
                    <tr>
                        <td>
                            <label>Pseudo</label>
                        </td>
                        <td>
                            <input type="text" name="user_name" value="<?php echo $value->user_name; ?>"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>Nom</label>
                        </td>
                        <td>
                            <input type="text" name="user_real_name" value="<?php echo $value->user_real_name; ?>"/>
                        </td>    
                    </tr>   
                    <tr>
                        <td>
                            <label>Mot de passe</label>
                        </td>
                        <td>
                            <input type="password" name="pwd"/>
                        </td>    
                    </tr>
                    <tr>
                        <td>
                            <label>confirmation</label>
                        </td>
                        <td>
                            <input type="password" name="confirmation_pwd"/>
                        </td> 
                    </tr>
                    <tr>
                        <td rowspan="2" align="center">
                            <input type="submit" value="valider"/>
                        </td>  
                    </tr>
                </table>   


                <?php
            }
            ?>
        </form>
        </div>
        <?php
    }

}

